package com.ponhu.ea2.stockcenter.provider.service.biz.stocksales;

import com.ponhu.ea2.stockcenter.dto.OrderInfoDTO;
import com.ponhu.ea2.stockcenter.dto.OrderInventoryInfo;
import com.ponhu.ea2.stockcenter.enums.DefinedSystem;
import com.ponhu.ea2.stockcenter.enums.ExchangeActionTypeEnum;
import com.ponhu.ea2.stockcenter.provider.support.enums.StockChangeInnerEventEnum;
import com.ponhu.ea2.stockcenter.provider.support.vo.InventoryInfoVO;
import com.ponhu.ea2.stockcenter.vo.OrderOccupyInfoVO;
import com.ponhu.ea2.stockcenter.vo.ReturnResponseBean;

import java.util.List;

/**
 * 销售层库存响应Service
 */
public interface SalesLevelStockResponseService {

    /**
     * 处理实物层变动事件
     * @param docNo 订单号
     * @param changeEventEnum 事件类型
     * @param inventoryInfoList 货品编码列表
     * @return
     */
    boolean handleRealityLevelChangeEvent(String docNo, StockChangeInnerEventEnum changeEventEnum, List<InventoryInfoVO> inventoryInfoList);

    /**
     * 销售层-订单占用库存事件处理
     * @param stockRequestToken 请求token
     * @param orderInfoDTO 订单信息DTO
     * @param definedSystem 对接系统
     * @param stockChangeInnerEventEnum 事件类型
     * @return
     */
    ReturnResponseBean<OrderOccupyInfoVO> orderOccupyStockHandler(String stockRequestToken, OrderInfoDTO orderInfoDTO,
                                                                  DefinedSystem definedSystem,
                                                                  StockChangeInnerEventEnum stockChangeInnerEventEnum);

    /**
     * 销售层-取消订单占用库存事件处理
     * @param stockRequestToken 请求token
     * @param orderNo 订单号
     * @param definedSystem 对接系统
     * @param stockChangeInnerEventEnum 事件类型
     * @return
     */
    ReturnResponseBean cancelOrderOccupyStockHandler(String stockRequestToken, String orderNo, DefinedSystem definedSystem,
                                                     StockChangeInnerEventEnum stockChangeInnerEventEnum);
}
